package com.xtxb.app.rmq.consume;

import org.apache.rocketmq.common.message.Message;
import org.apache.rocketmq.spring.annotation.ConsumeMode;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

//@Component
//@RocketMQMessageListener(topic = "tsmChannel", consumerGroup = "${rocketmq.consumer.group}", consumeMode = ConsumeMode.CONCURRENTLY)
public class MessageListener implements RocketMQListener<Message> {
    private static Logger log= LoggerFactory.getLogger(MessageListener.class);

    @Override
    public void onMessage(Message msg) {
//        log.info("接收消息: "+msg.getTopic()+"\t"+msg.getProperty("TAGS")+"\t"+new String(msg.getBody()));
    }
}
